home *** CD-ROM | disk | FTP | other *** search
/ Magnum One / Magnum One (Mid-American Digital) (Disc Manufacturing).iso / d7 / dbdial.arc / EXDIAL4.PRG < prev    next >
Text File  |  1989-08-20  |  2KB  |  97 lines

  1. do while .T.
  2. clear
  3. if iscolor()
  4. SET COLO OF NORM TO R/N
  5. SET COLO OF INFO TO W
  6. SET COLO OF MESS TO BG/N
  7. SET COLO OF TITL TO W/B
  8. SET COLO OF BOX TO G/N
  9. SET COLO OF FIEL TO G/N
  10. SET COLO OF HIGH TO W+/RB
  11. endif
  12. set talk off
  13. Set status off
  14. set delimiters to '[]'
  15. set delimiters on
  16. message = "DIALx.BIN Example Program"
  17. do menubox with message
  18. store 0 to m_port
  19. store space(20) to m_number
  20. @8,23 say [Is your modem on COM1: or COM2:] color bg+
  21. @8,54 get m_port picture '9' valid val_port() Error [Enter 1 (COM1:) or 2 (COM2:)]
  22. read
  23. if m_port = 1
  24. load dial1
  25. @8,54 say [COM1:] color gr+
  26. else
  27. load dial2
  28. @8,54 say [COM2:] color gr+
  29. endif
  30. @10,20 say [Enter number to dial ] color bg+
  31. @10,41 get m_number
  32. read
  33. store trim(m_number) to m_number
  34. store 'Dialing - ' + m_number to m_dial
  35. @12,40 - (len(m_dial)/2) say m_dial color gr*+
  36. @14,24 say [Press <SPACE> to hang up modem.] color w+
  37. if m_port = 1
  38. call dial1 with m_number
  39. else
  40. call dial2 with m_number
  41. endif
  42. store 'N' to ans
  43. @22,29 say [Dial another number?] color r+
  44. @22,51 get ans picture '!' valid val_ans() error [Enter Y (Yes) or N (No)]
  45. if ans = 'Y'
  46. loop
  47. else
  48. clear
  49. message = 'Enjoy the new power of dBASE'
  50. do menubox with message
  51. @7,5 say [Future enhancements include:] color r
  52. @8,10 say [Support for COM3: and COM4:] color w+
  53. @9,10 say [Error codes returned ] color w+
  54. @10,10 say [Pulse Dialing] color w+
  55. @12,3 say [Please support Starboard Tack Consulting by registering your copy of DIALx,] color gr+
  56. @13,3 say [or, give us a call for any of your custom dBASE, or Clipper programming ] color gr+
  57. @14,3 say [needs. (Our address is in the documents you recieved with this archive.] color gr+
  58. @22,23 say [Press any key to return to dBASE] color r+
  59. l_key = 0
  60. do while l_key = 0
  61. l_key = inkey()
  62. enddo
  63. if m_port = 1
  64. release module dial1
  65. else
  66. release module dial2
  67. endif
  68. release all like m*
  69. set status on
  70. set delimiters off
  71. set color to
  72. set talk on
  73. return
  74. endif
  75. enddo
  76.  
  77. PROC menubox
  78. PARA name
  79. CLEA
  80. @ 0, 0 TO 23, 79 DOUB COLO G
  81. @ 2, 1 TO 2, 78 DOUB COLO G
  82. @ 1, 1 SAY SUBS(CDOW(DATE()),1,3)+'. '+Dtoc(DATE())+' ' COLO GR+
  83. @ 1, 41 - (LEN(name)/2) SAY name COLO GR+
  84. RETU
  85.  
  86. function val_port
  87. if m_port = 1 .or. m_port = 2
  88. return .T.
  89. endif
  90. return .F.
  91.  
  92. function val_ans
  93. if ans = 'Y' .or. ans = 'N'
  94. return .T.
  95. endif
  96. return .F.
  97.